<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>

        div{
            width: 100px;
            height: 100px;
            background:red;
            animation: myAnimate 2s;
        }
        @keyframes myAnimate{
            0%{
                width: 100px;
                height: 100px;
            }
            20%{
                width: 200px;
                height: 200px;
                background: yellow;
            }
            50%{
                width: 300px;
                height: 200px;
                background: pink; 
            }
           100%{
                width: 100px;
                height: 100px;
                background: red; 
            }
        }
    </style>
</head>
<body>
    <div>

    </div>
</body>
</html>